<?php
namespace app\index\controller;
use think\Controller;
use think\Session;
use think\Db;
class Basic extends Controller
{
	
    //定义控制器初始化方法_initialize，在该控制器的方法调用之前首先执行。
    public function _initialize()
    {
        $request=  \think\Request::instance();//$request->controller()$request->module()."/".$request->action()
		
		if($request->action()=='index' and $request->controller()=='index'){$this->assign("actionf",'1');}else{ $this->assign('actionf',''); }
        $action= $request->controller();
		 $this->assign('action',$action); 
		 $this->assign('actionc',$request->action()); 
		 
		 $config= Db::name('config')->find();
		
		 $this->assign("config",$config);
		 $this->assign("userid",Session::get('userid'));
		
		 
		
    }


}
